package com.example.toy.core.commit;

import com.example.toy.core.version.ToyVersion;

/**
 * ToyCommiter
 *
 * @author shenbing
 * @date 2021/12/22
 */
public interface ToyCommitter {

  void submit(CommitMsg commit);

  /**
   * 忽略CommitMsg中的状态，以指定的状态提交CommitMsg
   *
   * @param commit
   * @param commitState
   */
  void submit(CommitMsg commit, CommitState commitState);

  void changeState(ToyVersion version, CommitState state);

  void compact();
}
